<?php
class Image {
    public function getStockImages() {
        $folderPath = HOME_PATH . "images/content/";
        $fileArray = array();
        $tempFh = opendir($folderPath);
        while(false !== ($file = readdir($tempFh))) {
            if (substr($file, 0, 1) != "." && substr($file, 0, 1) != "..") {
                $info = getimagesize($folderPath . $file);
                if ($info[2] == 2 || $info[2] == 3) {
                    $fileArray[] = $file;
                }
            }
        }
        closedir($tempFh);
        return $fileArray;
    }
}
?>